package cn.itcast.usermanage.service;

import java.util.List;

import cn.itcast.usermanage.pojo.EasyUIResult;
import cn.itcast.usermanage.pojo.User;

public interface UserService {

	/**
	 * 分页获取用户信息
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public EasyUIResult queryUsersByPage(Integer pageNum, Integer pageSize);
	
	/**
	 * 测试事务
	 * @param user1
	 * @param user2
	 * @throws Exception 
	 */
	public void addUsers(User user1, User user2) throws Exception;

	/**
	 * 新增用户
	 * @param user
	 * @return
	 */
	public Boolean addUser(User user) throws Exception;

	/**
	 * 修改用户
	 * @param user
	 * @return
	 * @throws Exception 
	 */
	public Boolean updateUser(User user) throws Exception;

	/**
	 * 删除用户
	 * @param ids
	 * @return
	 */
	public Boolean deleteUser(List<Object> ids);

	/**
	 * 根据id查询用户
	 * @param id
	 * @return
	 */
	public User queryUserById(Long id);

	/**
	 * 按照表单提交的id删除用户
	 * @param id
	 * @return
	 */
	public Boolean deleteUser(Long id);
	
}
